package com.heima.clients.article;

import com.heima.clients.article.fallback.ArticleClientFallback;
import com.heima.model.article.dtos.ArticleDto;
import com.heima.model.common.dtos.ResponseResult;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author xiaquanen
 * @version 1.0
 * @project heima-leadnews
 * @date 2024/7/22 10:37:11
 */
@Qualifier("iArticleClient")
@FeignClient(value = "leadnews-article",fallback = ArticleClientFallback.class)
public interface IArticleClient {

    @PostMapping("/api/v1/article/sync")
    public ResponseResult syncArticle(@RequestBody ArticleDto articleDto);

}
